Default Test ^^^^^ **Definition:** * By default Android Studio creates default test classes when a project is created. These template test classes are meant to serve as an example for developers when writing unit tests and should either be removed or renamed. Having such files in the project will cause developers to start adding test methods into these files, making the default test class a container of all test cases and violate good testing practices. Problems would also arise when the classes need to be renamed in the future. **Code Example:** .. code-block:: java public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } @Test public void shareProblem() throws InterruptedException { ..... Observable.just(200) .subscribeOn(Schedulers.newThread()) .subscribe(begin.asAction()); begin.set(200); Thread.sleep(1000); assertEquals(beginTime.get(), "200"); ..... } ..... } **References:** .. admonition:: Quality attributes * :octicon:`file-code;1em` - Code Example * :octicon:`comment-discussion;1em` - Cause and Effect * :octicon:`graph;1em` - Frequency * :octicon:`sync;1em` - Refactoring * `An Exploratory Study on the Refactoring of Unit Test Files in Android Applications `_ :octicon:`comment-discussion;1em` :octicon:`sync;1em` * `Automatic Identification of High-Impact Bug Report by Product and Test Code Quality `_ * `Automatic generation of smell-free unit tests `_ :octicon:`comment-discussion;1em` * `Handling Test Smells in Python: Results from a Mixed-Method Study `_ * `On the distribution of test smells in open source Android applications: an exploratory study `_ :octicon:`file-code;1em` :octicon:`graph;1em` * `On the influence of Test Smells on Test Coverage `_ * `On the test smells detection: an empirical study on the jnose test accuracy `_ :octicon:`graph;1em` * `On the use of test smells for prediction of flaky tests `_ :octicon:`comment-discussion;1em` :octicon:`graph;1em` * `PyNose: A Test Smell Detector For Python `_ :octicon:`comment-discussion;1em` :octicon:`graph;1em` * `Software Unit Test Smells `_ :octicon:`file-code;1em` * `Test Smell Detection Tools: A Systematic Mapping Study `_ * `What the Smell? An Empirical Investigation on the Distribution and Severity of Test Smells in Open Source Android Applications `_ :octicon:`file-code;1em` :octicon:`graph;1em` * `tsDetect: an open source test smells detection tool `_